package 传智播客_黑马.java高级.函数式.函数式接口;

import java.util.function.Consumer;

/*
一个消费者接口
 */
public class 常用Consumer {
    public static void spend(String name,Consumer<String> con){
        con.accept(name);
    }


    public static void main(String[] args) {
        spend("小王", System.out::println);
        //https://blog.csdn.net/zhoufanyang_china/article/details/87798829
    }
}
